﻿/*
* MasterPage.js
* zhouh@ZD_20160322
*/

//announcements

//functions
//Xss反注入
function filterString(s, maxLen) {
    if (s.length > maxLen) return false;
    s = s.replace(/ /g, "");
    var param = new Array("<", "%3c", ">", "%3e", "script", "document", "eval", "/", "%2f", "//");
    for (var i = 0; i < param.length; i++) {
        var reg = new RegExp(param[i]);
        if (reg.test(s)) return false;
    }
    return true;
}
function linkView(url, title, width, height) {
    var width = width || "600";
    var height = height || "480";
    var args = "z-look=yes,top=300,left=300,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, channelmode=yes,status=no";
    args += ",height=" + height;
    args += ",width=" + width;
    window.open(url, title, args);
}
//handlers
//init
